/* GLTextureManager.h
 *
 * --
 * Copyright (c) 2012, Christophe Huriaux
 * Distributed under the terms of the MIT license.
 * http://www.opensource.org/licenses/mit-license.php
 * --
 */
#include <map>
#include <graphics/GLTexture.h>

#ifndef GLTEXTUREMANAGER_H_
#define GLTEXTUREMANAGER_H_

class GLWindow;
class GLScene;

class GLTextureManager
{
	std::map<unsigned char, GLTexture*> textures;

	GLTextureManager();
	~GLTextureManager();

public:
	void setTexture(unsigned char id, GLTexture* texture);
	GLTexture* getTexture(unsigned char id);

	static GLTextureManager& getInstance();

private:
	void loadTextures();
	void useTexture(unsigned char id);

	friend class GLWindow;
	friend class GLScene;
};
#endif /* GLTEXTUREMANAGER_H_ */
